package com.xujh;


import java.util.ArrayList;
import java.util.Arrays;

public class TestSerialize {

    String jack1 = "[\"com.xujh.TestEntry\",{\"testStr\":\"111\",\"testList\":[\"java.util.ArrayList\",[\"11\",\"22\",\"33\"]]}]";

    String jackson2_7_9 = "[\"com.xujh.TestEntry\",{\"testStr\":\"111\",\"testList\":[\"java.util.ArrayList\",[\"11\",\"22\",\"33\"]]}]";

    String jack2_17_2 = "[\"com.xujh.TestEntry\",{\"testStr\":\"111\",\"testList\":[\"java.util.Arrays$ArrayList\",[\"11\",\"22\",\"33\"]]}]";
    public static void main(String[] args) throws Exception {
        TestEntry testEntry = new TestEntry();
        testEntry.setTestStr("111");
        testEntry.setTestList(new ArrayList(Arrays.asList("11", "22", "33")));
//        testEntry.setTestList(new ArrayList<String>(Arrays.asList("11", "22", "33")));  // ##WRAPPED##
//        testEntry.setTestList(new ArrayList<Object>(Arrays.asList("11")));  // ##WRAPPED##
//        testEntry.setTestList(.asList("11", "22", "33")));
        String body = PolymorphicJsonUtil.toJson(testEntry);

        TestEntry testEntry1 = PolymorphicJsonUtil.genObject(body, TestEntry.class);
        System.out.println(testEntry1);
    }
}
